"--ostree-dir", ot_gfile_get_path_cached (self->ostree_dir),
"update-kernel",
ot_gfile_get_path_cached (deploy_path), NULL);
+ if (opt_no_kernel)
+ g_ptr_array_add (args, "--modules-only");
g_ptr_array_add (args, NULL);
if (!ot_spawn_sync_checked (ot_gfile_get_path_cached (self->ostree_dir),
cancellable, error))
goto out;
- if (!opt_no_kernel)
- {
- if (!do_update_kernel (self, deploy_path, cancellable, error))
- goto out;
- }
+ if (!do_update_kernel (self, deploy_path, cancellable, error))
+ goto out;
ret = TRUE;
out:
GFile *ostree_dir;
} OtAdminUpdateKernel;
+static gboolean opt_modules_only;
+
static GOptionEntry options[] = {
+ { "modules-only", 0, 0, G_OPTION_ARG_NONE, &opt_modules_only, "Only copy kernel modules", NULL },
{ NULL }
};
if (!copy_modules (self, release, cancellable, error))
goto out;
-
- if (!update_initramfs (self, release, deploy_path, cancellable, error))
- goto out;
-
- if (!update_grub (self, release, cancellable, error))
- goto out;
+
+ if (!opt_modules_only)
+ {
+ if (!update_initramfs (self, release, deploy_path, cancellable, error))
+ goto out;
+
+ if (!update_grub (self, release, cancellable, error))
+ goto out;
+ }
ret = TRUE;
out: